package com.xiaoniu.forum.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xiaoniu.forum.common.utils.CommonQueryVo;
import com.xiaoniu.forum.common.utils.PageUtils;
import com.xiaoniu.forum.entity.CommunityTopicEntity;
import com.xiaoniu.forum.entity.CommunityTopicStatusEntity;
import com.xiaoniu.forum.entity.vo.AppCommunityTopTopicVo;
import com.xiaoniu.forum.entity.vo.ComunityTopiclUpdateInfoVo;
import com.xiaoniu.forum.entity.vo.PassListVo;
import com.xiaoniu.forum.form.TopicSaveOrUpdateForm;


import java.util.List;
import java.util.Map;

/**
 * 话题表
 *
 * @author xiaoniu
 * @email 55333@qq.com
 * @date 2021-03-23 15:07:41
 */
public interface CommunityTopicService extends IService<CommunityTopicEntity> {

    PageUtils queryPage(Map<String, Object> params);

    PageUtils queryPage(Map<String, Object> params, QueryWrapper<CommunityTopicEntity> wrapper);

    PageUtils queryPage(CommonQueryVo queryVo);

    void save(TopicSaveOrUpdateForm form);

    void updateById(TopicSaveOrUpdateForm form);

    ComunityTopiclUpdateInfoVo getById (String id);

    CommunityTopicStatusEntity getTopicStatusBycommunityTopicId(String communityTopicId);

    void updateTopicStatus(CommunityTopicStatusEntity communityTopicStatusEntity);

    boolean updateTopicBatchById(List<CommunityTopicEntity> topicList);

    PageUtils getListForPass(Map<String, Object> params);

    void passed(String communityTopicId);

    void passedFailed(String communityTopicId,String message);

    String getContentById(String id);
    //List<CommunityTopicThreeVo> getThreeOptions();

    //查询话题列表 置顶或公告
    List<AppCommunityTopTopicVo> getTopicTops(String id);

}

